class Zcm < ActiveRecord::Base
  cattr_reader :per_page
  @@per_page = 50

  validates_presence_of :title,:message=>'标题必须填写'
  validates_presence_of :content,:message=>'内容必须填写'
  
  validates_length_of :title,:maximum=>40,:message=>'标题不能超过40个字'
  validates_length_of :content,:maximum=>1000,:message=>'标题不能超过1000个字'
  validates_length_of :letter,:is=>1,:message=>'首字母必须是一个字母'
  
end
